// Location Class
//
// Digitally Abused
// 2007

#pragma once
#include "cdiobject.h"

class CdiLocation 
  : public CdiObject
{
protected:
  float m_x;
  float m_y;
  float m_z;
  float m_incrDelta;

public:
  // Constructors
  ///////////////////////////////////
  CdiLocation();
  CdiLocation(float xLocation, float yLocation, float zLocation);
  CdiLocation( CdiLocation& Location );
  virtual ~CdiLocation();
  
public:
  // Properties
  //////////////////////////////////

  // X Position
  float GetxPosition() const { return m_x; }
  
  // Y Position
  float GetyPosition() const { return m_y; }
  
  // Z Position
  float GetzPosition() const { return m_z; }

  // Delta
  float GetDelta() const { return m_incrDelta; }

  // Set X Position
  void SetxPosition( float& position ) { m_x = position; } 

  // Set X Position
  void SetyPosition( float& position ) { m_y = position; } 

  // Set X Position
  void SetzPosition( float& position ) { m_z = position; } 

  // Set Delta
  void SetDelta( float& delta ) { m_incrDelta = delta; }

public:
  // Methods
  //////////////////////////////////

  // Move a delta
  void Move( CdiLocation& delta );

  // Distance
  CdiLocation Distance( CdiLocation& object );
  CdiLocation Distance( float x, float y, float z );

public:
  // Operators
  //////////////////////////////////

  // Plus operator
  CdiLocation operator+( CdiLocation& next );

  // Subtraction operator
  CdiLocation operator-( CdiLocation& next );

  // Multi Operator
  CdiLocation operator*( CdiLocation& next );
  
  // Equals Op
  CdiLocation& operator=( CdiLocation& next );

  // Comparison Op
  bool operator==( CdiLocation& next );
};
